package com.tuliyou.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tuliyou.entity.UniMajorEnrollment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UniMajorEnrollmentMapper extends BaseMapper<UniMajorEnrollment> {
    @Select("SELECT * FROM uni_major_enrollments " +
            "WHERE university_code = #{universityCode} " +
            "AND enroll_year = #{enrollYear} " +
            "AND is_deleted = 0")
    List<UniMajorEnrollment> getUniMajorEnrollments(String universityCode, Integer enrollYear);

    @Select("select * from uni_major_enrollments where id = #{id} and is_deleted = 0")
    UniMajorEnrollment getUniMajorEnrollmentDetail(Long id);
}
